package com.seckill.common.constants;

public interface MqConstants {
    interface Exchange{
        /*商品有关的交换机*/
        String ITEM_EXCHANGE = "item.topic";

        /*订单有关的交换机*/
        String ORDER_EXCHANGE = "order.topic";

        /*异常信息的交换机*/
        String ERROR_EXCHANGE = "error.topic";

        /*交易服务延迟任务交换机*/
        String TRADE_DELAY_EXCHANGE = "trade.delay.topic";
        String TRADE_EXCHANGE = "trade.topic";

        /*优惠促销有关的交换机*/
        String PROMOTION_EXCHANGE = "promotion.topic";
    }
    interface Queue {
        String ERROR_QUEUE_TEMPLATE = "error.{}.queue";
    }
    interface Key{
        /*课程有关的 RoutingKey*/
        String ITEM_UP_KEY = "item.up";
        String ITEM_DOWN_KEY = "item.down";
        String ITEM_EXPIRE_KEY = "item.expire";

        /*订单有关的RoutingKey*/
        String ORDER_PAY_KEY = "order.pay";
        String ORDER_REFUND_KEY = "order.refund";

        /*秒杀的RoutingKey*/
        String SEC_KILL_KEY = "seckill.order";


        /*异常RoutingKey的前缀*/
        String ERROR_KEY_PREFIX = "error.";
        String DEFAULT_ERROR_KEY = "error.#";

        /*领取优惠券的key*/
        String COUPON_RECEIVE = "coupon.receive";
    }
}
